<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover">
    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
    <title>Funny</title>
    <script>
      function setUser(u){
        let userInfo= window.atob(u)
        // alert("获取到用户信息：" + userInfo)
        window.sessionStorage.setItem("u",userInfo);
      }
      // setUser("{id:27589,token:'29a11b265515fca3d0a57d7e487c081a'}")
      if(window.phonelive){window.phonelive.getUserInfo();}
      function getQuery(variable) {
        var query = window.location.href.split("?")[1];
        if (!query) return "";
        var vars = query.split("&");
        for (var i = 0; i < vars.length; i++) {
          var pair = vars[i].split("=");
          if (pair[0] == variable) {
            return pair[1];
          }
        }
        return "";
      }
      let uid = getQuery("uid");
      if (uid) {
        // console.log(uid);
        let token = getQuery("token");
        let userInfo = {
          id: uid,
          token: token
        };
        window.sessionStorage.setItem("u", JSON.stringify(userInfo));
      }

    </script>
  </head>
  <body>
    <noscript>
      <strong>We're sorry but funny doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
    </noscript>
    <div id="app"></div>
  </body>
</html>
